import { INestApplication } from '@nestjs/common';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';

export function swagger(app: INestApplication): INestApplication {
    const config = new DocumentBuilder()
        .setTitle('notificationBot')
        .setDescription('Бот для напоминаний и отслеживания БЖУ')
        .setVersion('1.0')
        .build();

    const document = SwaggerModule.createDocument(app, config);
    SwaggerModule.setup('api', app, document);
    return app;
}
